﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO.tenPay
{
    /// <summary>
    /// 请求基础参数
    /// </summary>
    public class ten_sub_req
    {
        /// <summary>
        /// 版本号
        /// </summary>
        public string version { get { return "1.0.1-IEST"; } }
    }
    /// <summary>
    /// 交易请求
    /// </summary>
    public class ten_sub_pre_pay : ten_sub_req
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 请求编号
        /// </summary>
        public string reqNo { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 交易名称
        /// </summary>
        public string tradeName { get; set; }
        /// <summary>
        /// 商户方交易时间
        /// </summary>
        public string tradeTime { get; set; }
        /// <summary>
        /// 交易金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 客户账户借记贷记类型
        /// </summary>
        public string custAccountCreditOrDebit { get; set; }
        /// <summary>
        /// 客户信用卡有效期
        /// </summary>
        public string custCardValidDate { get; set; }
        /// <summary>
        /// 客户信用卡cvv2
        /// </summary>
        public string custCardCvv2 { get; set; }
        /// <summary>
        /// 客户银行账号
        /// </summary>
        public string custBankAccountNo { get; set; }
        /// <summary>
        /// 绑定手机号
        /// </summary>
        public string custBindPhoneNo { get; set; }
        /// <summary>
        /// 客户姓名
        /// </summary>
        public string custName { get; set; }
        /// <summary>
        /// 客户证件号码
        /// </summary>
        public string custID { get; set; }
        /// <summary>
        /// 出款卡号，需要加密
        /// </summary>
        public string outCardNo { get; set; }
        /// <summary>
        /// 绑定手机号，无需加密
        /// </summary>
        public string outCardPhone { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string paymentNotifyURL { get; set; }
        /// <summary>
        /// 商户后台通知url
        /// </summary>
        public string notifyUrl { get; set; }
        /// <summary>
        /// 公网ip
        /// </summary>
        public string sourceIP { get; set; }
        /// <summary>
        /// 商户手续费
        /// </summary>
        public string rateAmount { get; set; }
        /// <summary>
        /// 城市名称
        /// </summary>
        public string cityName { get; set; }
        /// <summary>
        /// 支付费率
        /// </summary>
        public string payRate { get; set; }
        /// <summary>
        /// 结算费率
        /// </summary>
        public string settleFee { get; set; }
    }
    /// <summary>
    /// 交易请求响应
    /// </summary>
    public class ten_sub_pre_pay_res : ten_sub_res
    {
        public smsData data { get; set; }
    }
    /// <summary>
    /// 
    /// </summary>
    public class smsData
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 短信流水号
        /// </summary>
        public string smsSeq { get; set; }
    }
    /// <summary>
    /// 代付数据
    /// </summary>
    public class payment_data
    {
        public string id { get; set; }
        /// <summary>
        /// 付款方名称
        /// </summary>
        public string account_name { get; set; }
        /// <summary>
        /// 付款方行卡号
        /// </summary>
        public string account_no { get; set; }
        /// <summary>
        /// 身份证号:第一次上送时必输；如果快捷支付协议号不为空，则此数据项可以为空并失效。
        /// </summary>
        public string id_card { get; set; }
        /// <summary>
        /// 手机号码:第一次上送时必输；如果快捷支付协议号不为空，则此数据项可以为空并失效。
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 手续费
        /// </summary>
        public string rateAmount { get; set; }
        public smsData data { get; set; }
    }
    /// <summary>
    /// 响应基础参数
    /// </summary>
    public class ten_sub_res
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string reqNo { get; set; }
        /// <summary>
        /// 失败详情
        /// </summary>
        public string failureDetails { get; set; }
        /// <summary>
        /// 错误码
        /// </summary>
        public string errorCode { get; set; }
    }
    /// <summary>
    /// 交易确认
    /// </summary>
    public class ten_sub_pay : ten_sub_req
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 短信验证码
        /// </summary>
        public string smsCode { get; set; }
        /// <summary>
        /// 短信流水号
        /// </summary>
        public string smsSeq { get; set; }
    }
    /// <summary>
    /// 交易确认响应
    /// </summary>
    public class ten_sub_pay_res : ten_sub_res
    {
        public ten_sub_data data { get; set; }
    }
    /// <summary>
    /// 
    /// </summary>
    public class ten_sub_data
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 支付结果返回信息
        /// </summary>
        public string resultMsg { get; set; }
        /// <summary>
        /// 交易状态
        /// </summary>
        public string status { get; set; }
    }
    /// <summary>
    /// 异步通知响应
    /// </summary>
    public class ten_sub_pay_notify
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 交易状态
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 交易金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 商户编号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 交易时间
        /// </summary>
        public string tradeTime { get; set; }
        /// <summary>
        /// 交易类型
        /// </summary>
        public string tradeType { get; set; }
        /// <summary>
        /// 商户费率
        /// </summary>
        public string rateAmount { get; set; }
        /// <summary>
        /// 通道费率
        /// </summary>
        public string channelRateAmount { get; set; }

    }
    /// <summary>
    /// 交易单查询请求
    /// </summary>
    public class ten_sub_query : ten_sub_req
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 交易类型
        /// </summary>
        public string tradeType { get; set; }
    }
    /// <summary>
    /// 交易单查询响应
    /// </summary>
    public class ten_sub_query_res : ten_sub_res
    {
        /// <summary>
        /// 
        /// </summary>
        public List<query_detail> details { get; set; }
    }
    /// <summary>
    /// 
    /// </summary>
    public class query_detail
    {
        /// <summary>
        /// 交易金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 渠道手续费
        /// </summary>
        public string channelRateAmount { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 商户手续费
        /// </summary>
        public string rateAmount { get; set; }
        /// <summary>
        /// 交易状态
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 交易时间
        /// </summary>
        public string tradeTime { get; set; }
        /// <summary>
        /// 交易类型
        /// </summary>
        public string tradeType { get; set; }
    }
    /// <summary>
    /// 代付接口
    /// </summary>
    public class ten_sub_payment : ten_sub_req
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 交易名称
        /// </summary>
        public string tradeName { get; set; }
        /// <summary>
        /// 交易时间
        /// </summary>
        public string tradeTime { get; set; }
        /// <summary>
        /// 交易金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 到账卡号
        /// </summary>
        public string custBankAccountNo { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string custPhone { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        public string custName { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        public string custID { get; set; }
        /// <summary>
        /// 异步通知
        /// </summary>
        public string notifyUrl { get; set; }
        /// <summary>
        /// 商户手续费
        /// </summary>
        public string rateAmount { get; set; }
        /// <summary>
        /// 公网ip
        /// </summary>
        public string sourceIP { get; set; }
    }
    /// <summary>
    /// 代付响应
    /// </summary>
    public class ten_payment_res : ten_sub_res
    {
        /// <summary>
        /// 
        /// </summary>
        public paymentData data { get; set; }
    }
    /// <summary>
    /// 代付数据
    /// </summary>
    public class paymentData
    {
        /// <summary>
        /// 时间
        /// </summary>
        public string bankReturnTime { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 返回信息
        /// </summary>
        public string resultMsg { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string status { get; set; }
    }
    /// <summary>
    /// 代付异步通知
    /// </summary>
    public class ten_payment_notify
    {
        /// <summary>
        /// 实际到账金额
        /// </summary>
        public string amount { get; set; }
        /// <summary>
        /// 渠道费率
        /// </summary>
        public string channelRateAmount { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchantId { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string orderNo { get; set; }
        /// <summary>
        /// 手续费
        /// </summary>
        public string rateAmount { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 交易时间
        /// </summary>
        public string tradeTime { get; set; }
        /// <summary>
        /// 交易类型
        /// </summary>
        public string tradeType { get; set; }
    }
}
